package com.components;

import com.component.Candidates;
import com.component.Eoo;
import com.component.Foo;
import com.component.Foo1;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.DependsOn;

/**
 * @author fanxiao  2022/3/29
 * @since 1.0.0
 */
@Configuration
@Candidates(basePackage = "com.component")
@ComponentScan(basePackages = "com.component")
public class AppConfig {

	@Bean
	public Foo foo(Eoo eoo){
		eoo.eoo();
		return new Foo();
	}

	@Bean
	public Foo1 foo1(Eoo eoo) {
		foo(eoo);
    	return new Foo1();
	}
}